'I'm not sure if this is necessary, but I guess it's just to clean up and exit this program
Private Sub Form_Unload(Cancel As Integer)
cReg.StopSearch
Set cReg = Nothing
End Sub
'If you select multiple items, they will be checked if their unchecked and unchecked if their checked
Private Sub lvwRegErrors_ItemClick(ByVal Item As MSComctlLib.ListItem)
If Item.Checked = False Then
Item.Checked = True
Else
Item.Checked = False
End If
End Sub
'If the the right clicks on lvwRegErrors, mnuRepair become visible
Private Sub lvwRegErrors_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 2 And mnuRepair.Visible = True Then
PopupMenu mnuRepair
End If
End Sub
'About menu
Private Sub mnuAbout_Click()
MsgBox "VB Registry Fixer 1.0" & vbCrLf & vbCrLf & "If you use this program, you take full responsibility for any damages this program may do to your computer.", vbInformation, "VB Registry Fixer 1.0"
End Sub
Private Sub mnuExit_Click()
End
End Sub
'Creates a registry backup of all the values about to be deleted and then deletes them
Private Sub mnuFix_Click()
Dim i As Integer, nLoop As Single, m As Single
Dim NOTRemoved As Integer
Dim BackupFilename As String
On Error Resume Next
'I don't think this is necessary, but if the registry backup takes a while, this program tells the user to wait.
'Tell the user that this program has created a backup and and to restore the registry if the user's computer acts abnormal
MsgBox "This program has created a backup of all of the registry values that are about to be deleted. If you experience problems after using this, keep pressing F8 when you start up your computer and select Safe Mode and open up " & BackupFilename, vbInformation, "Important"
'Loop through every item in lvwRegErrors
For i = 1 To lvwRegErrors.ListItems.Count
'If the item is checked
If lvwRegErrors.ListItems.Item(i).Checked = True Then
'Delete the registry error and mark the item as removed
End If 'If you remove the if...then line above then also remove this line.
Next
'Tell the user how many items that were not removed
MsgBox "VB Registry Fixer has successfully fixed your registry. There were " & lvwRegErrors.ListItems.Count - NOTRemoved & " registry values that were NOT removed."
"Step 2 - When the scan is finished, check all the items on the list that you want to delete. I highly recommend that you look carefully for what items you want to remove and not just check all of them." & vbCrLf & vbCrLf & _
"Step 3 - Right click the list and click 'Delete All Checked Items'", vbInformation, "Help"